package com.model;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

public class CardTable {
	Map<String,String> cardtable=new HashMap<String , String>();

	
	
	public CardTable() {
//		super();
		// TODO 自动生成的构造函数存根
		try {

			if (this.getClass().getClassLoader().getResourceAsStream("cn.txt").available()>0) {
					BufferedReader br=new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("cn.txt"), "UTF-8"));
					while (br.ready()) {
						String str=br.readLine();
						String[] str_array=str.split(",");
						this.cardtable.put(str_array[0], str_array[1]);
					}
			}else{
				this.cardtable=null;
			}
			
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		} 
	}

	public Map<String, String> getCardtable() {
		return cardtable;
	}

	public void setCardtable(Map<String, String> cardtable) {
		this.cardtable = cardtable;
	}
	
}
